var win32 = require('./build/Release/win32');

var box = function(msg){
	var ev = {
		show: function(){
			console.log("info: "+msg);
		}
	};
	win32.setTemp(ev);
	var rst = {
		setShow: function(ns){
			ev.show = ns;
		},
		show: function(){
			ev.show();
		},
		remove: function(){
			win32.deleteTemp();
		}
	};
	return rst;
};

var a = box("huhuh");
a.show();

a.setShow(function(){
	console.log("debug");
});
var t = win32.getTemp();
console.log(t);
t.show();

a.remove();
t.show();
console.log(win32.getTemp());

win32.main("demo");

while(!win32.check());